<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
    <title>院校管理</title>
<link href="../styles/xuanz.css" rel="stylesheet" type="text/css" />
<script src="../styles/script.js" type="text/javascript"></script>
</head>

<body>
<div id="neinei">
<div id="kuangkuang_admin">
<%@ include file="/common/left-admin.jsp"%>
<div class="kuangright">
<h1>院校管理</h1>
<s:form action="schoolManager" method="post" namespace="/admin" theme="simple">
	<table width="580" border="0" cellspacing="1" cellpadding="5">
		<tr align="center">
			<td width="7%" bgcolor="#f2f2f2">选择</td>
			<td width="7%" bgcolor="#f2f2f2">序号</td>
			<td width="58%" bgcolor="#f2f2f2">院校名称</td>
			<td width="19%" bgcolor="#f2f2f2">院校总测评报告</td>
			<!-- <td width="12%" bgcolor="#f2f2f2">开通咨询</td> -->
			<s:if test='roleName == "ROLE_ADMIN"'>
			<td width="9%" bgcolor="#f2f2f2">删除</td>
			</s:if>
		</tr>
		<s:if test="schoolList.size > 0">
			<s:iterator value="schoolList" status="stat">
				<tr align="center">
					<s:if test="schoolType == 10">
						<td bgcolor="#FFFFFF"><input type="checkbox" onclick="checkChose(this);" name="chk_school" value="<s:property value="id" />" /></td>
						<td bgcolor="#FFFFFF"><b><s:property value="#stat.index + 1" /></b></td>
						<td bgcolor="#FFFFFF" align="left"><b>&nbsp;<s:property value="name" /></b></td>
					</s:if>
					<s:else>
						<td bgcolor="#FFFFFF">&nbsp;</td>
						<td bgcolor="#FFFFFF"><s:property value="#stat.index + 1" /></td>
						<td bgcolor="#FFFFFF" align="left">&nbsp;——&nbsp;<s:property value="name" /></td>
					</s:else>
					<s:if test="statReport">
						<s:url id="disSchoolReportUrl" action="disSchoolReport"
							namespace="/admin">
							<s:param name="id" value="id" />
						</s:url>
						<td bgcolor="#FFFFFF"><s:a href="%{disSchoolReportUrl}">查看</s:a></td>
					</s:if>
					<s:else>
						<td bgcolor="#FFFFFF">未达人数</td>
					</s:else>
					<s:url id="updSchoolUrl" action="schoolUpd" namespace="/admin">
						<s:param name="id" value="id" />
					</s:url>
					<!-- 
					<s:if test="schoolType == 10">
						<s:if test="openConsult == 1">
							<td bgcolor="#FFFFFF"><s:a href="%{updSchoolUrl}">已开通</s:a></td>
						</s:if>
						<s:else>
							<td bgcolor="#FFFFFF"><s:a href="%{updSchoolUrl}">未开通</s:a></td>
						</s:else>
					</s:if>
					<s:else>
						<td bgcolor="#FFFFFF">&nbsp;</td>
					</s:else>
					 -->
		          <s:url id="deleteUrl" action="schoolDelete" namespace="/admin">
		              <s:param name="id" value="id" />
		          </s:url>
		          <s:if test='roleName == "ROLE_ADMIN"'>
		          	<td bgcolor="#FFFFFF"><s:a href="%{deleteUrl}">删除</s:a></td>
		          </s:if>
				</tr>
			</s:iterator>
		</s:if>
	</table>
</s:form> <br />
<s:if test='roleName == "ROLE_ADMIN"'>
<div class="jsbox_ht_mainright"><b>添加新院校</b></div>
<div style="color:red;clear:both">
<s:fielderror />
</div>
<s:form action="schoolAdd" method="post" namespace="/admin" onsubmit="return addSchool();">
	<input type="hidden" name="id" value="" />
	<s:textfield name="schoolName" label="院校名称" cssStyle="width:150px"/>
	<s:select list="#{'10':'高校', '20':'院系'}" name="schoolType" headerKey="-1"
		headerValue="- 请选择高校或院系  -" label="院校类型" cssStyle="width:155px" />
	<s:submit value="增加院校" />
</s:form>
</s:if>
<br />
<br />
</div>
</div>
</div>

</body>
</html>
